#ifndef DATABASE_MANAGER_P_H
#define DATABASE_MANAGER_P_H

#include <QtCore/QList>
#include <QtCore/QMutex>
#include "global.h"
#include "dbmanager/sql_query.h"

namespace smsbilling {

class QueryHandler;
class DatabaseManager;

class DatabaseManagerPrivate : public QObject {
  Q_OBJECT
public:

  DatabaseManagerPrivate();

  ~DatabaseManagerPrivate();

private:

  void faultExecute(int code);

  friend class QueryHandler;
  friend class DatabaseManager;

  QList<SqlQuery *> queries;

  QList<QueryHandler *> handlers;

  int executed_success;

  QHash<int, int> executed_fault;

  QMutex mutex;
};

} // namespace smsbilling

#endif // DATABASE_MANAGER_P_H
